package com.tools;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * UTC格式转Date格式
 */
public class UTCDateConvert {

    //UTCTODATE
    /*public static void main(String[] args) throws ParseException {

*//*
        SimpleDateFormat df2 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
        SimpleDateFormat df1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        df2.setTimeZone(TimeZone.getTimeZone("UTC"));
        Date date = df1.parse("2017-04-25 09:01:07");


        System.out.println(date);

        String utcDate = df2.format(date);
        System.out.println(utcDate);
*//*


        SimpleDateFormat df3= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.ssss");

        Date parse = df3.parse("2019-8-14 11:32:46.0131");

        long time = parse.getTime();

        System.out.println(time);

    }*/
}
